package com.br.apurn.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


@Entity
@Table(name="CAMINHOFOTO")
public class CaminhoFoto implements Persistente{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public CaminhoFoto(){
		
	}
	
	@Id	
	@Column(name="caminho_id", nullable=false)	
	@SequenceGenerator(name="my_seq", sequenceName="account_user_id_seq")
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="my_seq")
	private Integer id;
	
	private String caminho;
	
	@ManyToOne
	@JoinColumn(name="news_id")
	private News news;

	public News getNews() {
		return news;
	}

	public void setNews(News news) {
		this.news = news;
	}

	public int getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCaminho() {
		return caminho;
	}

	public void setCaminho(String caminho) {
		this.caminho = caminho;
	}

	@Override
	public void setId(int id) {
		// TODO Auto-generated method stub
		
	}

}
